package com.sdx.console.question.entity;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.beetl.sql.core.annotatoin.ColumnIgnore;
import org.beetl.sql.core.annotatoin.AutoID;
import org.beetl.sql.core.annotatoin.SeqID;
import org.apache.commons.lang3.StringUtils;
import com.ibeetl.admin.core.util.ValidateConfig;
import com.sdx.service.ConfigService;

import org.beetl.sql.core.TailBean;
import java.math.*;

import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity;

import org.beetl.sql.core.annotatoin.InsertIgnore;
import org.beetl.sql.core.annotatoin.Version;
import org.beetl.sql.core.annotatoin.LogicDelete;
import com.sdx.common.utils.Utils;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

/* 
* 
* gen by Spring Boot2 Admin 2019-03-23
*/
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
@Data
public class QaQuestion extends BaseEntity{

    //问题ID
    @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
    @AutoID	
    private Integer questionId ;
	
    //问题标题
    private String title ;
	
    //问题描述
    private String describe ;
	
    //附件
    private String file ;
	
    //是否公开[0-不公开 1-公开]
    private Integer isOpen ;
	
    //是否推荐[0-不推荐 1-推荐]
    private Integer isTop ;
	
    //回答数
    private String answerCount ;
	
    //关注数
    private String followCount ;
	
    //会员ID
    private String customerId ;
	
    //创建时间
    private Date createTime ;
	
	public String getFileView(){
		return Utils.imageUrl(file);
	}

}
